package com.the_ring.structural.decorator;

import java.math.BigDecimal;

/**
 * @author: t22306139
 * @date: 2023/11/29  16:06
 */
public class MainTest {

    public static void main(String[] args) {
        Drink order1 = new Espresso(new BigDecimal("10.00"));
        System.out.println("Order1 price: " + order1.cost());
        System.out.println("Order1 description: " + order1.getDescription());
        System.out.println("**********************");
        Drink order2 = new Espresso(new BigDecimal("20.00"));
        order2 = new Milk(order2);
        order2 = new Sugar(order1);
        System.out.println("Order2 price: " + order2.cost());
        System.out.println("Order2 description: " + order2.getDescription());

    }
}
